<template>
  <ul class="news-list">
    <!-- 解构前 -->
    <!-- <li>编号：{{ route.query.id }}</li>
    <li>标题：{{ route.query.title }}</li>
    <li>内容：{{ route.query.content }}</li> -->
    <!-- 解构后 -->
    <li>编号：{{ query.id }}</li>
    <li>标题：{{ query.title }}</li>
    <li>内容：{{ query.content }}</li>
  </ul>
</template>

<script setup lang="ts" name="About">
import { toRefs } from 'vue'
import { useRoute } from "vue-router";
const route = useRoute()
// 解构route
const {query} = toRefs(route)
</script>

<style scoped>
.news-list {
  list-style: none;
  padding-left: 20px;
}

.news-list > li {
  line-height: 30px;
}
</style>
